package com.example.pkmedical.Utils;

import android.content.Context;
import android.content.Intent;
import android.os.CountDownTimer;

import com.example.pkmedical.Activity.LockScreenActivity;


/**
 * Created by Administrator on 2020/img_cg_on/25.
 */

public class CountTimer extends CountDownTimer {
    Context mContext;

    public CountTimer(long millisInFuture, long countDownInterval, Context mContext) {
        super(millisInFuture, countDownInterval);
        this.mContext = mContext;
    }

    //计时过程显示：如有需求你可以在特定的时间范围内执行自己操作
    @Override
    public void onTick(long l) {

    }

    //计时完毕时触发：我们的需求中的实现逻辑在这里，一般都逻辑会跳转一个屏保的Activity
    @Override
    public void onFinish() {
        mContext.startActivity(new Intent(mContext, LockScreenActivity.class));

    }
}